package com.sfang.common.base.collection;

import java.io.Serializable;

public class CustomKeyValuePair<A, B> implements Serializable {

    public CustomKeyValuePair() {

    }

    public A getKey() {
        return key;
    }

    public void setKey(A key) {
        this.key = key;
    }

    public B getValue() {
        return value;
    }

    public void setValue(B value) {
        this.value = value;
    }

    private A key;
    private B value;

    public CustomKeyValuePair(A a, B b) {
        this.key = a;
        this.value = b;
    }

    public static CustomKeyValuePair create(String key, Object value) {
        CustomKeyValuePair<String, Object> customKeyValuePair = new CustomKeyValuePair<>(key, value);
        return customKeyValuePair;
    }

    public static <A,B> CustomKeyValuePair create(A key, B value) {
        CustomKeyValuePair<A, B> customKeyValuePair = new CustomKeyValuePair<>(key, value);
        return customKeyValuePair;
    }
}


